package com.school.gmz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@TableName("borrow") // mybatis-plus
@ApiModel(description = "借阅记录实体") // 描述实体的用途
@Data
public class Borrow {
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID", notes = "唯一标识", position = 1)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Integer id;

    @ApiModelProperty(value = "名称", notes = "借阅记录的名称", position = 2)
    private String name;

    @ApiModelProperty(value = "借阅时间", notes = "记录借阅的时间", position = 3)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date btime;

    @ApiModelProperty(value = "归还时间", notes = "记录归还的时间", position = 4)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gtime;

    @ApiModelProperty(value = "借阅状态", notes = "记录的借阅状态", position = 5)
    private String bstate;
}